# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=judy
pkgver=1.0.5
pkgrel=1
pkgdesc="C library creating and accessing dynamic arrays"
url="https://judy.sourceforge.net/"
arch="all"
license="LGPL-2.0-only"
subpackages="$pkgname-dev $pkgname-doc"
source="https://sourceforge.net/projects/judy/files/judy/Judy-$pkgver/Judy-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make -j1 # man build require 1
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1a0d59b092c80d95270a3089cd25ee0ddad1d591101b03784e2e46dfc73bce445a7fb495b449043544a366c09b35b833556053bf3bf65dd00abbd786d26c6980  Judy-1.0.5.tar.gz
"
